public class Demo1 {
    public static void main(String[] args) throws InterruptedException {
        Object locker = new Object();
        synchronized (locker) {

            locker.wait();

        }
    }
}
